#include "Texture.h"
#include "hzpch.h"

#include "Hazel/platform/OpenGL/OpenGLTexture.h"
#include "Renderer.h"
namespace Hazel
{

Ref<Texture2D> Texture2D::Create(const std::string &filepath)
{
    switch (Renderer::GetAPI())
    {
    case RendererAPI::API::None:
        HZ_ASSERT(false, "Not Setting Platform");
        return nullptr;
#ifdef HZ_PLATFORM_WINDOWS
    case RendererAPI::API::OpenGL:
        return CreateRef<OpenGLTexture2D>(filepath);
#endif
    }
    HZ_ASSERT(false, "No Platform find!");
    return nullptr;
}
Ref<Texture2D> Texture2D::Create(uint32_t width, uint32_t height)
{
    switch (Renderer::GetAPI())
    {
    case RendererAPI::API::None:
        HZ_ASSERT(false, "Not Setting Platform");
        return nullptr;
#ifdef HZ_PLATFORM_WINDOWS
    case RendererAPI::API::OpenGL:
        return CreateRef<OpenGLTexture2D>(width, height);
#endif
    }
    HZ_ASSERT(false, "No Platform find!");
    return nullptr;
}
} // namespace Hazel